#pragma once
#include "UIBase.h"
#include "../tools/RichTextEx.h"

class TalkNpcUI : public UIBase
{
public:
	TalkNpcUI();
	~TalkNpcUI();
public:
	static cocos2d::Node* createNode();
	virtual bool init();
	CREATE_FUNC(TalkNpcUI);

	Node* m_selectedNode;
	bool m_isClicked;
	vector<Sprite*> m_controlList;

	ui::ImageView* m_talk_BG;
	RichTextEx* m_richText;
	Sprite* m_closeBtn;
public:
	bool TouchDown(Touch* touch);
	void TouchMove(Touch* touch);
	bool TouchUp(Touch* touch);

	void Open();							//打开
	void Close();							//关闭
	void RefreshData();					//刷新背包界面数据
	void setData(int merchant, string str);		//设置界面数据
};